Method for using a non-object-oriented datastore as a generic persistent datastore for persistent objects

ABSTRACT

A method, apparatus, and article of manufacture for using a non-object-oriented datastore as a generic persistent datastore for persistent objects. A computerized system in accordance with the principles of the present invention provides a “bridge” that interfaces between an application program and a non-object-oriented database management system to provide persistent storage for objects manipulated by the application program. The invention further provides a class definition tool for defining a generic database description associated with the non-object-oriented datastore, for defining a specification for the non-object-oriented datastore using the generic database description, for defining a specification for a generic datastore persistent object class using the specification of the non-object-oriented datastore, and for generating generic schema mapper class definition and method source code using the generic datastore persistent object class specification, wherein the generic schema mapper class definition and method source code has methods for interfacing the application program and the non-object-oriented datastore.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and commonly-assigned patentapplication Ser. No. 08/738,105, entitled “METHOD FOR USING ANON-OBJECT-ORIENTED DATASTORE AS A GENERIC PERSISTENT DATASTORE FORPERSISTENT OBJECTS,” filed on Oct. 25, 1996, by Kenneth R. Blackman andJack L. Howe III, now U.S. Pat. No. 5,809,509, which application isincorporated by reference herein.

This application is related to the following and commonly-assignedpatent applications:

application Ser. No. 08/736,762, entitled “A FRAMEWORK FOROBJECT-ORIENTED ACCESS TO NON-OBJECT-ORIENTED DATASTORES,” filed on samedate herewith, by Kenneth R. Blackman and Jack L. Howe III, now U.S.Pat. No. 5,799,313;

application Ser. No. 08/736,763, entitled “A METHOD FOR REPRESENTINGNON-OBJECT-ORIENTED DATASTORES USING A COLLECTION OF COLLECTIONS DATAMODEL,” filed on same date herewith, by Kenneth R. Blackman and Jack L.Howe III, now U.S. Pat. No. 5,794,248;

application Ser. No. 08/738,294, entitled “A METHOD FOR THE INCREMENTALPRESENTATION OF NON-OBJECT-ORIENTED DATASTORES USING AN OBJECT-ORIENTEDQUERYABLE DATASTORE COLLECTION,” filed on same date herewith, by KennethR. Blackman and Jack L. Howe III, now U.S. Pat. No. 5,781,907;

application Ser. No. 08/738,104, entitled “A QUERY SYNTAX FOR ACCESSINGNON-RELATIONAL, NON-OBJECT-ORIENTED DATASTORES,” filed on same dateherewith, by Kenneth R. Blackman and Jack L. Howe III, now U.S. Pat. No.5,778,379;

application Ser. No. 08/738,082, entitled “A QUERY PARSER FOR ACCESSINGNON-RELATIONAL, NON-OBJECT-ORIENTED DATASTORES,” filed on same dateherewith, by Kenneth R. Blackman and Jack L. Howe III, now U.S. Pat. No.5,778,358;

application Ser. No. 08/738,330, entitled “A METHOD FOR USING ADATASTORE CURSOR FOR THE INCREMENTAL PRESENTATION OF QUERY RESULTS WHENTRAVERSING IMPLIED COLLECTIONS IN NON-OBJECT-ORIENTED DATASTORES,” filedon same date herewith, by Kenneth R. Blackman and Jack L. Howe III, nowU.S. Pat. No. 5,787,436;

application Ser. No. 08/736,759, entitled “A METHOD FOR REPRESENTINGDATA FROM NON-RELATIONAL, NON-OBJECT-ORIENTED DATASTORES AS QUERYABLEDATASTORE PERSISTENT OBJECTS,” filed on same date herewith, by KennethR. Blackman and Jack L. Howe III, now U.S. Pat. No. 5,794,247;

application Ser. No. 08/736,764, entitled “A METHOD FOR ENCAPSULATINGDATA FROM NON-OBJECT-ORIENTED DATASTORES AS DATASTORE PERSISTENTOBJECTS,” filed on same date herewith, by Kenneth R. Blackman and JackL. Howe III, now U.S. Pat. No. 5,765,161;

application Ser. No. 08/738,103, entitled “A METHOD FOR USING QUERYABLEPERSISTENT IDENTIFIERS TO LOCATE DATA FOR DATASTORE PERSISTENT OBJECTSIN NON-OBJECT-ORIENTED DATASTORES,” filed on same date herewith, byKenneth R. Blackman and Jack L. Howe III, now U.S. Pat. No. 5,765,163;

application Ser. No. 08/736,983, entitled “A METHOD FOR INTERFACINGQUERYABLE DATASTORE PERSISTENT OBJECTS TO NON-RELATIONAL,NON-OBJECT-ORIENTED DATASTORES,” filed on same date herewith, by KennethR. Blackman and Jack L. Howe III, now U.S. Pat. No. 5,761,671;

application Ser. No. 08/736,952, entitled “A METHOD FOR MANAGINGQUERYABLE DATASTORE PERSISTENT OBJECTS AND QUERYABLE DATASTORECOLLECTIONS IN AN OBJECT-ORIENTED ENVIRONMENT,” filed on same dateherewith, by Kenneth R. Blackman and Jack L. Howe III, now U.S. Pat. No.5,765,162;

application Ser. No. 08/736,765, entitled “A METHOD FOR CATALOGINGDATASTORE CHARACTERISTICS AND DEFINING AND GENERATING DATASTOREPERSISTENT OBJECTS,” filed on same date herewith, by Kenneth R. Blackmanand Jack L. Howe III, now U.S. Pat. No. 5,937,597;

application Ser. No. 08/736,922, entitled “A METHOD FOR CAPTURING ANDCATALOGING DATASTORE CHARACTERISTICS TO DEFINE DATASTORE PERSISTENTOBJECTS,” filed on same date herewith, by Kenneth R. Blackman and JackL. Howe III, now U.S. Pat. No. 5,809,508;

application Ser. No. 08/738,102, entitled “A METHOD FOR CAPTURING ANDCATALOGING SPECIFICATIONS FOR DATASTORE PERSISTENT CLASSES,” filed onsame date herewith, by Kenneth R. Blackman and Jack L. Howe III, nowU.S. Pat. No. 5,737,589; and

application Ser. No. 08/738,761, entitled “A METHOD FOR CAPTURING ANDCATALOGING PROGRAM CHARACTERISTICS FOR THE USAGE OF DATASTORE PERSISTENTCLASSES,” filed on same date herewith, by Kenneth R. Blackman and JackL. Howe III, now U.S. Pat. No. 5,764,979;

all of which applications are incorporated by reference herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to computerized methods foraccessing datastores, and in particular, to a computerizedobject-oriented method for accessing non-object-oriented datastores.

2. Description of Related Art

It is well known in the art to use database management systems, such asIBM's IMS™ (Information Management System) database management system,to manage computerized datastores. Indeed, IMS™ has been used fordecades and remains in use today. Currently, application programsdeveloped by object-oriented programming systems (OOPS) require anobject-oriented database management system (OODBMS) to store persistentobjects. Because of the prevalence of such “legacy” datastores as IMS™,there is a need to store persistent objects in non-object-orienteddatastores. There is a need in the art for tools to assist OOPSprogrammers in storing persistent objects without substantial additionalcoding, both object-oriented and non-object-oriented.

Thus, there is a need in the art for improved techniques for bridgingbetween non-object-oriented datastores and object-oriented applicationprograms.

SUMMARY OF THE INVENTION

To overcome the limitations in the prior art described above, and toovercome other limitations that will become apparent upon reading andunderstanding the present specification, the present invention disclosesa method, apparatus, and article of manufacture for using anon-object-oriented datastore as a generic persistent datastore forpersistent objects. A computerized system in accordance with theprinciples of the present invention provides a “bridge” that interfacesbetween an application program and a non-object-oriented databasemanagement system to provide persistent storage for objects manipulatedby the application program. The invention further provides a classdefinition tool for defining a generic database description associatedwith the non-object-oriented datastore, for defining a specification forthe non-object-oriented datastore using the generic databasedescription, for defining a specification for a generic datastorepersistent object class using the specification of thenon-object-oriented datastore, and for generating generic schema mapperclass definition and method source code using the generic datastorepersistent object class specification, wherein the generic schema mapperclass definition and method source code has methods for interfacing theapplication program and the non-object-oriented datastore.

Various advantages and features of novelty which characterize theinvention are pointed out with particularity in the claims annexedhereto and form a part hereof. However, for a better understanding ofthe invention, its advantages, and the objects obtained by its use,reference should be made to the drawings which form a further parthereof, and to accompanying descriptive matter, in which there isillustrated and described specific examples of an apparatus inaccordance with the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Referring now to the drawings in which like reference numbers representcorresponding parts throughout:

FIG. 1 is a block diagram illustrating an exemplary hardware environmentused to implement the preferred embodiment of the present invention;

FIG. 2 is a block diagram illustrating a collection of collections datamodel according to the present invention;

FIG. 3 is a block diagram illustrating an exemplary datastore collectionof the bridge according to the present invention;

FIG. 4 is a block diagram illustrating the operation of the bridgeaccording to the present invention;

FIG. 5 is a block diagram illustrating the operation of the instancemanager of the bridge according to the present invention;

FIG. 6 is a block diagram illustrating the operation of the classdefiner tool according to the present invention; and

FIG. 7 is a flow chart illustrating the steps performed in implementingthe generic persistent datastore according to the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

In the following description of the preferred embodiment, reference ismade to the accompanying drawings which form a part hereof, and in whichis shown by way of illustration a specific embodiment in which theinvention may be practiced. It is to be understood that otherembodiments may be utilized and structural changes may be made withoutdeparting from the scope of the present invention.

Overview

The present invention provides a generic persistent datastore forpersistent objects. A computerized system in accordance with theprinciples of the present invention provides a “bridge” that interfacesbetween an application program and a non-object-oriented databasemanagement system to provide persistent storage for objects manipulatedby the application program. The invention further provides a classdefinition tool for defining a generic database description associatedwith the non-object-oriented datastore, for defining a specification forthe non-object-oriented datastore using the generic databasedescription, for defining a specification for a generic datastorepersistent object class using the specification of thenon-object-oriented datastore, and for generating generic schema mapperclass definition and method source code using the generic datastorepersistent object class specification, wherein the generic schema mapperclass definition and method source code has methods for interfacing theapplication program and the non-object-oriented datastore.

Hardware Environment

FIG. 1 is a block diagram illustrating an exemplary hardware environmentused to implement the preferred embodiment of the invention. Aworkstation or terminal 100 communicates with a server computer 102.Both the workstation 100 and the server computer 102 are typicallycomprised of one or more processors, random access memory (RAM),read-only memory (ROM), and other components such as data storagedevices and data communications devices.

The workstation 100 executes one or more computer programs 104 operatingunder the control of an operating system 106, such as the MVS™, VM™,AIX™, OS/2™, Windows™, Macintosh™, AS/400™, or UNIX™ operating systems.These computer programs 104 transmit commands to the server computer 102for performing various functions and receive data from the servercomputer 102 in response to the commands.

The server computer 102 also operates under the control of an operatingsystem 108, such as the MVS™, VM™, AIX™, OS/2™, Windows™, Macintosh™,AS/400™, or UNIX™ operating systems. The server computer 102 executesone or more computer programs 110 and 112 under the control of theoperating system 108. These computer programs 110 and 112 receivecommands from the workstation 100 for performing various functions andtransmit data to the workstations 100 in response to the commands.

The server computer 102 manages one or more external databases ordatastores 114 stored on one or more data storage devices 116 (such as afixed or hard disk drive, a floppy disk drive, a CD-ROM drive, a tapedrive, or other device). In the preferred embodiment, the externaldatastore 114 comprises an IMS™ datastore managed by an IMS™ databasemanagement system (DBMS) product offered by IBM Corporation. Thoseskilled in the art will recognize, however, that the present inventionmay be applied to any datastore and associated database managementsystem.

The present invention is generally implemented using five majorcomponents executed by the workstation 100 and the server computer 102,i.e., object-oriented application program 104, workstation operatingsystem 106, server operating system 108, bridge 110, and datastoremanager (DSM) 112, wherein each of these components comprise one or morecomputer programs. The object-oriented application program 104 performsapplication functions; the workstation operating system 106 controls theoperation of the workstation 100; the server operating system 108controls the operation of the server computer 102; the bridge 110materializes data retrieved from the external database 114 as objects;and the datastore manager 112 controls access to the external database114.

Generally, these computer programs 104-112 are all tangibly embodied inor retrievable from a computer-readable medium, e.g., a data storagedevice or a data communications device. Moreover, the computer programsare all comprised of instructions which, when read and executed by theworkstation 100 and/or server computer 102, causes the workstation 100and/or server computer 102 to perform the steps necessary to implementand/or use the present invention.

Those skilled in the art will recognize that any combination of theabove components, or any number of different components, includingcomputer programs, peripherals, and other devices, may be used toimplement the present invention, so long as similar functions areperformed thereby.

Datastore Model

FIG. 2 is a block diagram illustrating the collection of collectionsdata model used in the present invention. Data retrieved from thenon-object-oriented external datastore 114 is modeled as a “collectionof object collections” in the bridge 110. Where the external data has asimple structure, each record is encapsulated as an object, whichbecomes a member of an object collection. Where the records arehierarchical in structure, that hierarchical structure is modeled bycreating object collections and then hierarchically connecting therelated object collections. Other complex logical records can be modeledas a hierarchy of object collections. A single collection of collectionsis materialized for each datastore, e.g., the object model of two flatfiles is a model having two collections of collections.

Block 200 represents the logical hierarchical structure of the data asstored in the external datastore 114, and block 202 represents thelogical “collection of object collections” structure created from thedata retrieved from the external datastore 114. The bridge 110translates the data between the differing formats and structures inblocks 200 and 202.

In the logical hierarchical structure of block 200, parent record A(204) has children records B (206) and C (208), and child record C (208)is also a parent of children records D (210) and E (212). There may alsobe multiple instances of parent record A (214 and 216).

Similarly, in the logical “collection of object collections” structureof block 202, parent object A (218) has children objects B (220) and C(222), and child object C (222) is also a parent of children objects D(224) and E (226). Further, there are multiple instances of parentobject A (228 and 230). Each of these objects is a datastore persistentobject (DPO) that encapsulates a logical unit of data, i.e., record,retrieved from the non-object-oriented datastore, and includes memberfunctions for manipulating the encapsulated data. Thus, the differencebetween blocks 200 and 202 is that each record A, B, or C in block 200is represented by a DPO in block 202, and the hierarchy in block 200 isrepresented by the collections of object collections in block 202.

Datastore Collection

The bridge 110 manages “datastore collections”, which are the foundationof the “collections of object collections” data model. The members ofthe datastore collection are the DPOs. The datastore collection alsoincludes a query evaluator having a query syntax and a query parser, aqueryable datastore cursor, and an associated result collection with acursor. For complex queries, queries may be sub-divided. Results for thequeries are presented in user-specifiable increments, which permits thedelivery of large result collections while controlling use of memory.

FIG. 3 is a block diagram illustrating an exemplary datastore collection300 of the bridge 110 according to the present invention. The datastorecollection 300 includes a query evaluator 302 for receiving a query fromthe application program 104, wherein the query evaluator 302 comprises aquery syntax and a query parser. The query evaluator 302 parses thequery request in accordance with the query syntax and stores the parsedrequest in a parse table in a query object 304. A datastore cursor 306retrieves the parsed query from the query object 304 and provides theparsed query to an instance manager 308, which coordinates requests fromthe application program 104 with the datastore collection 300 and theexternal datastore 114. The instance manager 308 uses a schema mapper310 to interface with the datastore manager 112. The datastore manager112 retrieves data from the external datastore 114 on the externalstorage device 116 and returns the requested data to the schema mapper310. The schema mapper 310 translates common elements between therequested data retrieved from the external datastore 114 and a DPO 312,which results in the requested data being encapsulated in the DPO 312.The schema mapper 310 returns the DPO 312 through the instance manager308 to the datastore cursor 306 which stores the DPO 312 in the resultcollection 314. Generally, the result collection 314 comprises one ormore DPOs 316, 318, and 320.

The datastore cursor 306 populates the result collection 314 so that theapplication program 104 can incrementally access the query result.Because the number of data items or records requested by the query maybe large, the datastore cursor 306 only populates the result collection314 with a specified number of DPOs 316, 318, and 320 that correspond tothe query request. A pointer to the current DPOs 316, 318, or 320 ismaintained by the cursor 322, and the size of the result collection 314is determined by a size variable 324.

If the application program 104 needs to access more data items orrecords that satisfy the query, the datastore cursor 306 deletes one ormore of the DPOs 316, 318, and 320 from the result collection 314 andrequests the instance manager 308, through the schema mapper 310, toretrieve additional DPOs 312, up to the number indicated in the sizevariable 324, into the result collection 314.

In addition to populating a DPO 312 with data from the externaldatastore 114, the schema mapper 310 updates the external datastore 114with changed data from the DPO 312. The schema mapper 310 may add datato the external datastore 114 when a new DPO 312 is created, and theschema mapper 310 may delete corresponding data from the externaldatastore 114 when a existing DPO 312 is deleted.

The schema mapper 310 translates queries to specific instructions forthe datastore manager 112. Generally, these instructions comprise:SELECT, UPDATE, INSERT and DELETE, wherein the SELECT instructionretrieves data from the external datastore 114 via the datastore manager112 for a DPO 312; the UPDATE instruction, following a SELECT, saveschanged data from the DPO 312 into the external datastore 114 via thedatastore manager 112; the INSERT instruction saves new data from theDPO 312 into the external datastore 114 via the datastore manager 112;and the DELETE instruction deletes the DPO 312 and its correspondingdata from the external datastore 114 via the datastore manager 112.

Datastore Persistent Objects (DPOs)

The members, or elements, of the datastore collection 300 are queryableDPOs 316, 318, and 320 that encapsulate external data, i.e., recordsretrieved from the external datastore 114, with associated methods tomove data with data type integrity between the DPOs 316, 318, and 320,and the records of the external datastore 114. Thus, a DPO 316, 318, and320 makes non-object-oriented data accessible as “base class objects”that may be used or wrappered by other classes in an object-orientedprogramming system. Further, the data being encapsulated by the DPO 316,318, and 320 may or may not be concurrently shared or updated betweenobject-oriented and non-object-oriented applications, depending on thecharacteristics of the underlying datastore 114.

The bridge 110 thus comprises a queryable persistence implementationthat can be used to access data in non-object-oriented datastores 114.The bridge 110 provides a datastore persistent object class to wrapperdata retrieved from the external datastore 114, a queryable persistentidentifier (PID) used to specify information used to locate the data inthe external datastore 114 needed to populate the particular DPO 312,and a schema mapper class used to obtain the required data from theexternal datastore 114 and translate or transfer it into the format ofthe particular DPO 312.

FIG. 4 is a block diagram illustrating the operation of the bridge 110according to the present invention. The application program 104 passes aquery request to the datastore collection 300. The datastore collection300 evaluates the query and passes control to the datastore cursor 306for processing. The datastore cursor 306 creates a DPO 312 and itsassociated PID 400. The PID 400 is used to specify the query informationneeded to locate the data in the external datastore 114.

The DPO 312 and PID 400 are passed to the instance manager 308 whorequests that the schema mapper 310 retrieve the data via the datastoremanager 112 for storing into the DPO 312. The schema mapper 310 looks atthe DPOs 312 accompanying PID 400 which has information from the queryobject 304 for locating data. The schema mapper 310 provides theinput/output commands to the datastore manager 112 using informationfrom a subschema mapper 402 and program specification block (PSB) 404.The schema mapper 310 receives the located logical unit of data from thedatastore manager 112 and maps the located data into the DPO 312,thereby “wrappering” the logical unit of data. Upon completion of theoperation, the DPO 312 then encapsulates the data retrieved by theschema mapper 310.

Instance Manager

FIG. 5 is a block diagram illustrating the operation of the instancemanager 308 according to the present invention.

In the run-time environment, the datastore collections 300 and DPOs 316,318, and 320 are managed (e.g., created, tracked, materialized,destroyed, and garbage collected) by the instance manager 308. Theinstance manager 308 also participates in the unit-of-work between theapplication program 104 being served and the external datastore 114.

Although the interface to the application program 104 remains constant,the level of service provided by the instance manager 308 will varyaccording to the characteristics of the external datastore 114. Theinstance manager 308 will exploit the capabilities of the externaldatastore 114 and the datastore manager 112 wherever possible, e.g.,with regard to query functions, concurrency, security, etc.

The instance manager 308 uses service classes to isolate some of itsfunctions, system services object (SSO) 500, interface object services(IOS) 502, and subschema mapper 402. The SSO 500 serves as a “factory”for creating DPO 312 and datastore collections 300 requested by queryobjects 304. The SSO 500 further serves as a transaction manager for theunit-of-work.

The SSO 500 receives a unit-of-work request from the application program104. The SSO 500 creates a subschema mapper 402 and opens a PSB 404 forthe unit-of-work request. The SSO 500 interfaces to the datastoremanager 112 through the IOS 502. The IOS 502 opens and closes theconnection to the datastore manager 112.

Using the schema mapper 310, the instance manager 308 populates thedatastore collection 300 with DPOs 316, 318, and 320 that encapsulatedata retrieved from the external datastore 114 via the datastore manager112. The schema mapper 310 updates the external datastore 114 withchanged data from the DPOs 316, 318, and 320, and adds or deletes theassociated elements from the external datastore 114 when the DPOs 316,318, and 320 are added or deleted.

The SSO 500 propagates a request to complete a unit-of-work to theinstance manager 308, the datastore collection 300, the schema mapper310, and the DPOs 316, 318, and 320, so as to coordinate the requestswith the datastore manager 112 to maintain the integrity of the externaldatastore 114. Upon completion of the unit-of-work, the instance manager308 deletes the DPOs 316, 318 and 320, the datastore collection 300, andschema mapper 310, from the memory of the server computer 102.

Datastore Class Definition Tool (CDT)

To minimize the need for writing non-object-oriented code to access thenon-object-oriented datastore 114, the datastore persistent objectclasses and methods used in the present invention are generated by aDatastore Class Definition Tool (CDT). At run-time, the bridge 110instantiates datastore persistent objects for these classes and directsthe retrieval of data from the external datastore 114 into the datastorepersistent objects.

FIG. 6 is a block diagram illustrating the operation of the CDT 600according to the present invention. The CDT 600 executes under thecontrol of the operating system 106 on the workstation 100 and interactswith an operator via a Graphical User Interface (GUI) 602.

A define datastore specification function 604 of the CDT 600 capturesinformation from a database description and the record layout, andassociates them to one another to define a datastore specificationstored in a CDT datastore catalog 606. The database description includesinformation about the structure of the segments in the externaldatastore 114 and the record layouts include formatting information forthe records in the datastore 114. The database descriptions and recordlayouts accessed by the CDT 600 are typically located on the servercomputer 102.

The database description is derived from any source of information abouta datastore, such as a database definition (DBD) in an IMS™ datastore, aVSAM™ file description, file definition source files, recorddefinitions, source files, catalogs, repositories, or any other sourceof datastore information. These files generally define the datastore 114in terms of size, structure, relationship, associations, data elementsize and type.

In the preferred embodiment, the record layout is captured from a COBOL“copylib” used by the application program 104. On the other hand, therecord layout may also be captured from other languages, such as C, C++,Assembler, Pascal or PL/1, for example. Capturing a record layoutinvolves parsing the “copylib” to extract field information, includingposition, type and length.

If the database description or the record layout changes, the definedatastore specification function 604 may update the datastorespecification stored in the catalog 606 in response to the change.

The define datastore specification function 604 that associates thedatabase description with the record layout can either be doneautomatically by the CDT 600 or in response to a command from a DatabaseAdministrator (DBA). An example of automatic association would be theCDT 600 associating database description names with record layout names;alternatively, the DBA could manually enter such associations into theCDT 600. The resulting datastore specification contains the relevantinformation extracted from the database description and the recordlayout, and links the database description and record layout together.The define datastore specification function 604 may further perform anaugment function that captures additional information to assist indefining the datastore specification. Examples of this additionalinformation are date formats, range of values, sets of values, triggerfields, null values, foreign keys, partial keys, optimistic lockingindicators, required fields for insert, calculated fields,child/dependent datastore persistent objects, etc.

A define datastore persistent object specification function 608 of theCDT 600 uses the datastore specification in the CDT datastore catalog606 and DBA input to define a datastore persistent object specification,which is then stored in the CDT datastore catalog 606. In the preferredembodiment, the define datastore persistent object specificationfunction 608 of the CDT 600 performs functions of naming the datastorepersistent object class, accepting operator input that describes thedatastore persistent object class, and identifying characteristics ofthe datastore source, e.g, fields in a record or fields in a segment.The define datastore persistent object specification function 608 mayfurther perform an augment function that captures additional informationto assist in defining the datastore persistent object specification andto constrain the use of datastore persistent objects. Examples of thisadditional information are date formats, range of values, sets ofvalues, trigger fields, null values, foreign keys, partial keys,optimistic locking indicators, required fields for insert, calculatedfields, child/dependent datastore persistent objects, etc.

A generate datastore persistent object specification source codefunction 610 of the CDT 600 uses the datastore persistent objectspecification to generate source code for the datastore persistent classand its associated schema mapper class. The source code includes bothclass definitions and method implementations for the classes. The codegenerated by the CDT 600 is compiled, linked, and made available inexecutable form at run-time.

The define program specification function 612 of the CDT 600 capturescharacteristics of the object-oriented application program 104 to beexecuted on the workstation 100 as a program specification, which isstored in the CDT datastore catalog 606. The define programspecification function 612 provides information about theobject-oriented application program 104 that is useful in generatingsubschema mapper class definition and method source code and PSB sourcecode. The define program specification function 612 of the CDT 600 mayfurther perform an augment function that captures additional informationto assist in defining the program specification. In the preferredembodiment, the define program specification function 612 performs thefunctions of identifying the object-oriented application program 104,providing descriptive text about the object-oriented application program104, identifying the datastore persistent objects used by theobject-oriented application program 104, and capturing characteristicsrelated to the use of the datastore persistent objects (e.g., whetherconcurrent access to objects is required, whether the applicationprogram will update and delete objects, etc.) by the application program104.

The generate program specification source code function 614 of the CDT600 generates source code for PSBs and paired subschema mapper classdefinitions and methods. The code generated by the CDT 600 is compiled,linked, and made available in executable form at run-time. Generally,the PSBs are macro-assembler statements, e.g., System/360 assemblerlanguage for IMS™ datastores 114, that define the datastores 114 andsegments accessible to application programs 104.

As is known in the art, a PSB comprises one or more program controlblocks (PCB) for an IMS™ datastore 114. A PCB is a control statementthat names the IMS™ datastore 114 being accessed and the processingoptions. More specifically, the PCB enumerates the segment names thatmay be accessed and their processing options.

Generic Persistent Datastore

The bridge 110 according to the present invention provides a genericpersistent datastore for persistent objects. Instead of defining anexternal datastore, e.g. an IMS™ database, or using an object-orienteddatabase management system, the generic persistent datastore accordingto the present invention allows an object-oriented application programto store data persistently in a non-object-oriented datastore.

The generic persistent datastore comprises the bridge 110 and theexternal datastore 114. The CDT 600 stores the specifications andgenerates the code necessary for the bridge 110 to access generic DPOsin the external datastore 114.

FIG. 7 is a flow chart illustrating the steps performed in implementingthe generic persistent datastore according to the present invention.

Block 700 represents the CDT 600 defining a generic datastoredescription associated with the external datastore. The genericdatastore description provides a source of information about adatastore, such as a database definition (DBD) in an IMS™ datastore, aVSAM™ file description, file definition source files, recorddefinitions, source files, catalogs, repositories, or any other sourceof datastore information. These files generally define the datastore 114in terms of size, structure, relationship, associations, data elementsize and type. The generic datastore description includes informationabout the structure of the segments in the external datastore 114 andthe record layouts include formatting information for the records in thedatastore 114. The generic datastore description describes the datastoreinformation for storing any generic DPO. Thus, a new datastoredescription is not defined for each new DPO.

Block 702 represents the CDT 600 capturing information from the genericdatastore description and the record layout, and associating them to oneanother to define a generic datastore specification stored in a CDTdatastore catalog 606.

Block 704 represents the CDT 600 defining a generic datastore persistentobject specification using the generic datastore specification and DBAinput. The generic datastore persistent object specification is storedin the CDT datastore catalog 606.

Block 706 represents the CDT 600 generating source code for the genericdatastore persistent class and its associated generic schema mapperclass. The source code includes both class definitions and methodimplementations for the classes. The generic schema mapper class hasmethods for interfacing with the datastore 114, e.g., the generic schemamapper class has procedures for navigating the IMS™ hierarchy. Further,the generic schema mapper class has methods for interfacing with thedatastore 114 as a generic datastore. The generate program specificationsource code function 614 of the CDT 600 generates source code for PSBsand paired subschema mapper class definitions and methods. The codegenerated by the CDT 600 is compiled, linked, and made available inexecutable form at run-time.

The bridge 110 accesses the datastore 114 to execute instructions fromthe application program 104 to SELECT, UPDATE, INSERT and DELETE thegeneric DPOs.

Conclusion

This concludes the description of the preferred embodiment of theinvention. The following paragraphs describe some alternative methods ofaccomplishing the same objects.

In alternative embodiments of the present invention, other types andconfigurations of computers could be used. For example, the inventionneed not be restricted to client-server configurations. In addition,mainframes, minicomputers, or personal computers, could be used with thepresent invention.

In alternative embodiments of the present invention, other types andconfigurations of computer programs could be used. For example, theinvention need not be restricted to client-server configurations.

In alternative embodiments of the present invention, other databasemanagement systems could be used. For example, the invention need not berestricted to IMS™ database management systems. In addition, the presentinvention could be used to model other types of information.

In summary, a method, apparatus, and article of manufacture for using anon-object-oriented datastore as a generic persistent datastore forpersistent objects has been described. A computerized system inaccordance with the principles of the present invention provides a“bridge” that interfaces between an application program and anon-object-oriented database management system to provide persistentstorage for objects manipulated by the application program. Theinvention further provides a class definition tool for defining ageneric database description associated with the non-object-orienteddatastore, for defining a specification for the non-object-orienteddatastore using the generic database description, for defining aspecification for a generic datastore persistent object class using thespecification of the non-object-oriented datastore, and for generatinggeneric schema mapper class definition and method source code using thegeneric datastore persistent object class specification, wherein thegeneric schema mapper class definition and method source code hasmethods for interfacing the application program and thenon-object-oriented datastore.

The foregoing description of the preferred embodiment of the inventionhas been presented for the purposes of illustration and description. Itis not intended to be exhaustive or to limit the invention to theprecise form disclosed. Many modifications and variations are possiblein light of the above teaching. It is intended that the scope of theinvention be limited not by this detailed description, but rather by theclaims appended hereto.

What is claimed is:
 1. A data structure for use in an object-orientedcomputer system, comprising a generic persistent datastore stored in anon-object-oriented datastore on a computer and accessed by one or moreapplication programs executed by a computer, wherein the genericpersistent datastore is defined by a generic database descriptionassociated with the non-object-oriented datastore, the genericpersistent datastore stores one or more datastore persistent objectsdefined by a generic datastore persistent object class, the datastorepersistent objects encapsulate data from the non-object-orienteddatastore and are materialized in the computer for access by theprograms.
 2. The data structure of claim 1, wherein the objects areorganized in one or more object collections.
 3. The data structure ofclaim 1, wherein a bridge program executed by the computer interfacesthe application programs to the non-object-oriented datastore andtranslates common elements between the objects and the data stored inthe datastore.
 4. The data structure of claim 3, wherein the bridgeprogram populates an object with data retrieved from the genericpersistent datastore, updates the generic persistent datastore withchanges made to the data encapsulated by the object, and deletes thedata from the generic persistent datastore when the object is deleted.5. The data structure of claim 1, wherein the bridge program furtherincludes a queryable persistent identifier used to specify informationused to locate the data in the generic persistent datastore needed topopulate a particular object.
 6. The data structure of claim 1, whereinthe datastore persistent objects are base class objects that arewrappered by other classes in an object-oriented programming system. 7.The data structure of claim 1, wherein the datastore persistent objectsare base class objects that are used by other classes in anobject-oriented programming system.
 8. The data structure of claim 1,wherein the data being encapsulated by the objects may be concurrentlyshared between object-oriented and non-object-oriented applications. 9.The data structure of claim 5, wherein the datastore collections areorganized as a collection of object collections.